package com.ymttest.database.sqlwapper;

import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.ymt.core.tool.Logger;
import com.ymt.database.SqlManager;
import com.ymttest.database.model.YmtFundDimension;
import com.ymttest.database.model.YmtProducts;
import com.ymttest.database.model.YmtProductsI;
import com.ymttest.utils.EnvSetup;

/************************************************************************************
 * @File name : AttachProductToLivesWapper.java
 * @Author : 邓金姣
 * @Date : 2016年8月16日
 * @Copyright : 洋码头
 * 商品加入直播
 ************************************************************************************/
public class AttachProductToLivesWapper {
	SqlManager manage;

	
	public AttachProductToLivesWapper() {
		manage = new SqlManager("intpro");
		 
	}
	public List<Map> selectAttachProductToLives(Map m) throws InterruptedException {
		List<Map> selectAttachProductToLives = manage.getSelectResults("com.ymttest.database.mapping.AttachProductToLivesMapper.selectAttachProductToLives", m );
		// manage.close();
		return selectAttachProductToLives;
	}
	
	public static void main(String args[]) {
	    try {	          
	    	AttachProductToLivesWapper attachProductToLivesWapper = new AttachProductToLivesWapper();
	    	Map m = new HashMap();
	    	m.put("iActivityId", 146257);
	    	m.put("sProductId", "8b323d97-deb4-48dc-ab38-2ba6c7ec6e5d");
	        List<Map> rm = attachProductToLivesWapper.selectAttachProductToLives(m);
	        Logger.debug(rm.get(0).get("iActivityId")); 
	        Logger.debug(rm.get(0).get("sProductId")); 
	        String sProductId = (String) rm.get(0).get("sProductId");
	    } catch (InterruptedException e) {
	        e.printStackTrace(); 
	    }
	}
	
	
}
